<!DOCTYPE html>
<html>
<head lang="en">
    <base href="${request.contextPath}/"/>
    <meta charset="UTF-8">
    <#import "/spring.ftl" as spring>
    <title><@spring.message code="login.tip"/></title>
    <link rel="shortcut icon" href="${request.contextPath}/favicon.ico" type="image/x-icon" />
    <link href="${request.contextPath}/zhny/css/reset.css" rel="stylesheet" type="text/css">
    <link href="${request.contextPath}/zhny/css/baiKe.css" rel="stylesheet" type="text/css">

    <script type="text/javascript" src="${request.contextPath}/zhny/js/echarts.js"></script>

    <script src="${request.contextPath}/zhny/js/jquery.min.js"></script>
    <!--字体缩放js-->
    <script src="${request.contextPath}/zhny/js/js-style.js"></script>
    <!--end字体缩放js-->
    <!--动态特效-->
    <link href="${request.contextPath}/zhny/css/style.css" rel="stylesheet" type="text/css" />

</head>
<body >
<!--top-->

<header class="header">
    <div class="header_box clearfix">
        <div class="header_box_l">
            <p>hello, ${user.username!""},<@spring.message code="index.wel"/></p>
        </div>
        <div class="header_box_c">
                <div class="masked"><@spring.message code="login.tip"/></div>
        </div>
        <div class="header_box_r ">
            <a href="${request.contextPath}/sy/nybk/nybknew.html?locale=zh_CN" target="_self">中文版</a>
            <a href="${request.contextPath}/sy/nybk/nybknew.html?locale=en_US" target="_self">English</a>
            <a href="${request.contextPath}/sy/logout" target="_self"><@spring.message code="index.out"/></a>
        </div>
    </div>
</header>
<!--end top-->

<div class="comment clearfix">
    <!--左侧-->
    <div class="nongJi_l a">
        <div class="top_title">
                <div class="masked" style="font-size: 0.3rem;font-weight: bold">农技推广</div>
            <div class="masked" style="font-size: 0.16rem">Agricultural Technology Extension</div>
            <div class="line" style="margin-top: 20px;"></div>
        </div>
        <div class="nongJi_l_box" style="overflow-y:auto; overflow-x:auto; height:500px;">
            <ul>
                <#list njtg as njtgs>
                <li class="clearfix" >
                        <a href="javascript:;" onclick="nybk('${njtgs.id}');" target="_self">
                          <!--  < a href="${request.contextPath}/sy/nybk/nybkDetil.html/${njtgs.id}" target="_self">-->
                        ${(njtgs.title)!''}
                    </a>
                    <span>${njtgs.createTime?string('yyyy-MM-dd')}</span>
                </li>
            </#list>
            </ul>
        </div>
    </div>
    <!--右侧-->
    <div class="yaoFei_c a">
        <div class="top_title">
            <div class="masked" style="font-size: 0.3rem;font-weight: bold">药肥知识</div>
            <div style="font-size: 0.16rem" class="masked">Knowledge of medicine and fertilizer</div>
            <div class="line" style="margin-top: 20px;"></div>
        </div>
        <div class="nongJi_l_box" style="overflow-y:auto; overflow-x:auto; height:500px;">
            <ul>
                <#list yfzs as yfzss>
                <li class="clearfix" >
<!--                    <a href="${request.contextPath}/sy/nybk/nybkDetil.html/${yfzss.id}" target="_self">-->
                    <a href="javascript:;" onclick="nybk('${yfzss.id}');" target="_self">
                        ${(yfzss.title)!''}
                    </a>
                    <span>${yfzss.createTime?string('yyyy-MM-dd')}</span>
                </li>
            </#list>
            </ul>
        </div>
    </div>
    <!--右侧-->
    <div class="zuoWu_c a">
        <div class="top_title">
            <div class="m-6">
                <div class="masked" style="font-size: 0.3rem;font-weight: bold">作物百科</div>
                <div style="font-size: 0.16rem" class="masked">Crop Encyclopedia</div>
                <div class="line" style="margin-top: 20px;"></div>
            </div>
        </div>
        <div class="nongJi_l_box" style="overflow-y:auto; overflow-x:auto; height:500px;">
            <ul>
                <#list zubk as zubks>
                <li class="clearfix" >
                    <a href="javascript:;" onclick="nybk('${zubks.id}');" target="_self">
                   <!-- <a href="${request.contextPath}/sy/nybk/nybkDetil.html/${zubks.id}" target="_self">-->
                        ${(zubks.title)!''}
                    </a>
                    <span>${zubks.createTime?string('yyyy-MM-dd')}</span>
                </li>
            </#list>
            </ul>
        </div>
    </div>
    <!--右侧-->
    <div class="chongHai_r a">
        <div class="top_title">
            <div class="m-6">
            <div class="masked" style="font-size: 0.3rem;font-weight: bold">虫害防治</div>
            <div class="masked" style="font-size: 0.16rem">Pest Control</div>

                <div class="line" style="margin-top: 20px;"></div>
            </div>
        </div>
        <div class="nongJi_l_box" style="overflow-y:auto; overflow-x:auto; height:500px;">
            <ul>
                <#list chfz as chfzs>
                <li class="clearfix">
                    <a href="javascript:;" onclick="nybk('${chfzs.id}');" target="_self">
                   <!-- <a href="${request.contextPath}/sy/nybk/nybkDetil.html/${chfzs.id}" target="_self">-->
                        ${(chfzs.title)!''}
                    </a>
                    <span>${chfzs.createTime?string('yyyy-MM-dd')}</span>
                </li>
            </#list>
            </ul>
        </div>
    </div>

</div>
<!--nav-->
<div class="container">
    <section>
       <!-- <button  onclick="window.location.href='${request.contextPath}/sy/index/indexnew.html'"  class="btn btn-green btn-border-o">首页</button>
        <button onclick="window.location.href='${request.contextPath}/sy/nydsj/nydsjnew.html'" class="btn btn-blue btn-border-o">数据检测</button>
        <button onclick="window.location.href='${request.contextPath}/sy/zlzs/zlzsnew.html'" class="btn btn-purple btn-border-o">质量追溯</button>
        <button onclick="window.location.href='${request.contextPath}/sy/zjwd/zjwdnew.html'" class="btn btn-red  btn-border-o">专家指导</button>
        <button onclick="window.location.href='${request.contextPath}/sy/nybk/nybknew.html'" class="btn btn-orange btn-border-o  active5">农业百科</button>
-->
        <#if isAdmn == "TRUE">
        <button  onclick="shouye()"  class="btn btn-green btn-border-o "><@spring.message code="index.sy"/></button>
    </#if>
        <button onclick="nydsj()" class="btn btn-blue btn-border-o"><@spring.message code="index.sjjc"/></button>
        <button onclick="zlzs()" class="btn btn-purple btn-border-o "><@spring.message code="index.zlzs"/></button>
        <button onclick="zjzd()" class="btn btn-red  btn-border-o"><@spring.message code="index.zjzd"/></button>
        <button onclick="nybk1()" class="btn btn-orange btn-border-o active5"><@spring.message code="index.nybk"/></button>
    </section>
</div>

<script type="text/javascript">
    $(".title").css("line-height",$(".title").height() + 'px')
    $(window).resize(function(){
        $(".title").css("line-height",$(".title").height() + 'px')
    })
    var locale="";
    window.onload = function(){
        var req = new XMLHttpRequest();
        req.open('GET', document.location, false);
        req.send(null);
        var headers = req.getAllResponseHeaders();
        locale=req.getResponseHeader('content-language');
        if(locale=="en-US"){
            locale="en_US";
        }else{
            locale="zh_CN";
        }
    }

    function zlzs(){
        window.location.href="${request.contextPath}/sy/zlzs/zlzsnew.html?locale="+locale;
    }
    function shouye(){
        window.location.href="${request.contextPath}/sy/index/indexnew.html?locale="+locale;
    }
    function zjzd(){
        window.location.href="${request.contextPath}/sy/zjwd/zjwdnew.html?locale="+locale;
    }
    function nybk1(){
        window.location.href="${request.contextPath}/sy/nybk/nybknew.html?locale="+locale;
    }
    function nydsj(){
        window.location.href="${request.contextPath}/sy/nydsj/nydsjnew.html?locale="+locale;
    }
    function nybk(id) {
        window.location.href="${request.contextPath}/sy/nybk/nybkDetil.html?id="+id+"&locale="+locale;
    }
</script>


</body>
</html>
